package com.HuiShou.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.HuiShou.mapper.PointsExchangeRecordMapper;
import com.HuiShou.domain.PointsExchangeRecord;
import com.HuiShou.service.IPointsExchangeRecordService;

/**
 * 积分兑换记录Service业务层处理
 * 
 * @author lyz
 * @date 2025-03-21
 */
@Service
public class PointsExchangeRecordServiceImpl implements IPointsExchangeRecordService 
{
    @Autowired
    private PointsExchangeRecordMapper pointsExchangeRecordMapper;

    /**
     * 查询积分兑换记录
     * 
     * @param exchangeId 积分兑换记录主键
     * @return 积分兑换记录
     */
    @Override
    public PointsExchangeRecord selectPointsExchangeRecordByExchangeId(String exchangeId)
    {
        return pointsExchangeRecordMapper.selectPointsExchangeRecordByExchangeId(exchangeId);
    }

    /**
     * 查询积分兑换记录列表
     * 
     * @param pointsExchangeRecord 积分兑换记录
     * @return 积分兑换记录
     */
    @Override
    public List<PointsExchangeRecord> selectPointsExchangeRecordList(PointsExchangeRecord pointsExchangeRecord)
    {
        return pointsExchangeRecordMapper.selectPointsExchangeRecordList(pointsExchangeRecord);
    }

    /**
     * 新增积分兑换记录
     * 
     * @param pointsExchangeRecord 积分兑换记录
     * @return 结果
     */
    @Override
    public int insertPointsExchangeRecord(PointsExchangeRecord pointsExchangeRecord)
    {
        return pointsExchangeRecordMapper.insertPointsExchangeRecord(pointsExchangeRecord);
    }

    /**
     * 修改积分兑换记录
     * 
     * @param pointsExchangeRecord 积分兑换记录
     * @return 结果
     */
    @Override
    public int updatePointsExchangeRecord(PointsExchangeRecord pointsExchangeRecord)
    {
        return pointsExchangeRecordMapper.updatePointsExchangeRecord(pointsExchangeRecord);
    }

    /**
     * 批量删除积分兑换记录
     * 
     * @param exchangeIds 需要删除的积分兑换记录主键
     * @return 结果
     */
    @Override
    public int deletePointsExchangeRecordByExchangeIds(String[] exchangeIds)
    {
        return pointsExchangeRecordMapper.deletePointsExchangeRecordByExchangeIds(exchangeIds);
    }

    /**
     * 删除积分兑换记录信息
     * 
     * @param exchangeId 积分兑换记录主键
     * @return 结果
     */
    @Override
    public int deletePointsExchangeRecordByExchangeId(String exchangeId)
    {
        return pointsExchangeRecordMapper.deletePointsExchangeRecordByExchangeId(exchangeId);
    }
}
